package com.jingbo.entity;

/**
 * @author jiangjingbo
 * @version V1.0
 * @Project java2203
 * @Package com.jingbo.entity
 * @Description:
 * @Date 2022/5/28 14:37
 */
public class paging {
    //页码 当前页数
    private Integer pageIndex;
    //显示多少行数据(每页显示条数)
    private Integer pageSize;
    //数据总行数
    private Integer totalCounts;
    //总页面 一共多少页
    //总页数 = 总页数 % 每条显示条数 == 0 ? 总页数/ 每页显示条数 : 总条数/ 每页显示条数+1
    private Integer totalPages;
    //起始行 从第几条开始查询 =( 当前页数-1) *每页显示数据条数
    private Integer startRows;

    public paging() {
    }

    public paging(Integer pageIndex, Integer pageSize, Integer totalCounts, Integer totalPages, Integer startRows) {
        this.pageIndex = pageIndex;
        this.pageSize = pageSize;
        this.totalCounts = totalCounts;
        this.totalPages = totalPages;
        this.startRows = startRows;
    }

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotalCounts() {
        return totalCounts;
    }

    public void setTotalCounts(Integer totalCounts) {
        this.totalCounts = totalCounts;
    }

    public Integer getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(Integer totalPages) {
        this.totalPages = totalPages;
    }

    public Integer getStartRows() {
        return startRows;
    }

    public void setStartRows(Integer startRows) {
        this.startRows = startRows;
    }

    @Override
    public String toString() {
        return "paging{" +
                "pageIndex=" + pageIndex +
                ", pageSize=" + pageSize +
                ", totalCounts=" + totalCounts +
                ", totalPages=" + totalPages +
                ", startRows=" + startRows +
                '}';
    }
}
